#include"stack.h"
#if 0
int main()
{
	ST st;
	STinit(&st);
	STpush(&st, 1);
	STpush(&st, 2);
	STpush(&st, 3);
	STpush(&st, 4);
	printf("%d\n", STtop(&st));
	STpop(&st);
	printf("%d\n", STtop(&st));
	STpop(&st);
	STpop(&st);
	STpop(&st);
	//STpop(&st);
	STdestroy(&st);
	return 0;
}
#endif
int main()
{
	ST st;
	STinit(&st);
	STpush(&st, 1);
	STpush(&st, 2);
	printf("%d ", STtop(&st));
	STpop(&st);
	STpush(&st, 3);
	STpush(&st, 4);
	while (!STempty(&st))
	{
		printf("%d ", STtop(&st));
		STpop(&st);
	}
	STdestroy(&st);
	return 0;
}